﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Modules/Master/main.master" AutoEventWireup="true" CodeFile="controlCenter.aspx.cs" Inherits="Modules_IA_controlCenter" %>

<%@ Register assembly="Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" namespace="Microsoft.Reporting.WebForms" tagprefix="rsweb" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <form id="form1" runat="server">
        <link href="css/controlStyle.css" rel="stylesheet" />
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:Timer ID="Timer1" runat="server" Interval="5000" OnTick="Timer1_Tick"></asp:Timer>
                <div class="seeArea">
                    <div class="seetop">查看区域</div>
                    <div class="seeAreal">
                        <asp:Label ID="Label4" CssClass="lable" runat="server" Text="选择模式:"></asp:Label>
                        <asp:DropDownList ID="DropDownListModeName"  CssClass="dropdownlist" runat="server" OnSelectedIndexChanged="DropDownListModeName_SelectedIndexChanged" >
                        </asp:DropDownList>
                        &nbsp;<asp:Label ID="Label1" CssClass="lable" runat="server" Text="区域号："></asp:Label>
                        <asp:DropDownList  ID="DropDownListArea" CssClass="dropdownlist" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1" DataTextField="area" DataValueField="area" OnSelectedIndexChanged="DropDownListArea_SelectedIndexChanged">
                        <asp:ListItem Selected="True"></asp:ListItem>
                    </asp:DropDownList>
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:smartGardenConnectionString %>" SelectCommand="SELECT DISTINCT [area] FROM [dealReceive] ORDER BY [area]">
                        </asp:SqlDataSource>
                        <br />
                        <asp:Label ID="Label2" CssClass="lable" runat="server" Text="实时数据查看："></asp:Label>
                        <br />
                        <asp:Label ID="Label40" runat="server" Text="查看模式:"></asp:Label>
                        <asp:Label ID="LabelMode" runat="server" Text="-"></asp:Label>
                        <br />
                        <asp:Label ID="Label33" runat="server" CssClass="lable" Text="查看区域:"></asp:Label>
                        <asp:Label ID="LabelQueryArea" runat="server" CssClass="lable" Text="-"></asp:Label>
                        <br />
                        <div class="seeAreall">
                            <asp:Label ID="Label10" runat="server" CssClass="lable" Text="空气湿度:"></asp:Label>
                            <asp:Label ID="LabelNowHum" runat="server" CssClass="lable" Text="-"></asp:Label>
                            <br />
                            <asp:Label ID="Label15" runat="server" CssClass="lable" Text="土壤湿度:"></asp:Label>
                            <asp:Label ID="LabelNowSoilHum" runat="server" CssClass="lable" Text="-"></asp:Label>
                            <br />
                            <asp:Label ID="Label35" runat="server" CssClass="lable" Text="天　　气:&nbsp;"></asp:Label>
                            <asp:Label ID="LabelNowRain" runat="server" CssClass="lable" Text="-"></asp:Label>
                        </div>
                        <div class="seeArealc">
                            <asp:Label ID="Label8" runat="server" CssClass="lable" Text="时间:"></asp:Label>
                            <asp:Label ID="LabelTime" runat="server" CssClass="lable" Text="-"></asp:Label>
                            <br />
                            <asp:Label ID="Label34" runat="server" CssClass="lable" Text="温度:"></asp:Label>
                            <asp:Label ID="LabelNowTemp" runat="server" CssClass="lable" Text="-"></asp:Label>
                            <br />
                            <asp:Label ID="Label17" runat="server" CssClass="lable" Text="光照:"></asp:Label>
                            <asp:Label ID="LabelNowIll" runat="server" CssClass="lable" Text="-"></asp:Label>
                        </div>
                    </div>
                    <div class="seeArear">
                        <div class="seeArear1">
                            <rsweb:ReportViewer ID="ReportViewer1" runat="server" Font-Names="Verdana" Font-Size="8pt" Height="196px" ShowBackButton="False" ShowCredentialPrompts="False" ShowDocumentMapButton="False" ShowExportControls="False" ShowFindControls="False" ShowPageNavigationControls="False" ShowParameterPrompts="False" ShowPrintButton="False" ShowPromptAreaButton="False" ShowRefreshButton="False" ShowToolBar="False" ShowWaitControlCancelLink="False" ShowZoomControl="False" WaitMessageFont-Names="Verdana" WaitMessageFont-Size="14pt" Width="656px">
                                <LocalReport ReportPath="Report.rdlc">
                                    <DataSources>
                                        <rsweb:ReportDataSource DataSourceId="ObjectDataSource1" Name="DataSet1" />
                                    </DataSources>
                                </LocalReport>
                            </rsweb:ReportViewer>
                            <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetData" TypeName="smartGardenDataSetTableAdapters.TOPReceiveTableAdapter"></asp:ObjectDataSource>
                        </div>
                        <div class="seeArear2">
                            <div class="see">
                                <asp:Label ID="Label36" runat="server" CssClass="lable" Text="空气湿度:" Font-Names="microsoft yahei"></asp:Label>
                                <asp:Label ID="LabelNowHum0" runat="server" CssClass="lable" Text="-"></asp:Label>
                            </div>
                            <div class="see">
                                <asp:Label ID="Label37" runat="server" CssClass="lable" Text="　　温度:" Font-Names="microsoft yahei"></asp:Label>
                                <asp:Label ID="LabelNowTemp0" runat="server" CssClass="lable" Text="-"></asp:Label>
                                &nbsp;&nbsp;</div>
                            <div class="see">
                                <asp:Label ID="Label38" runat="server" CssClass="lable" Text="土壤湿度:" Font-Names="microsoft yahei"></asp:Label>
                                <asp:Label ID="LabelNowSoilHum0" runat="server" CssClass="lable" Text="-"></asp:Label>
                            </div>
                            <div class="see">
                                <asp:Label ID="Label39" runat="server" CssClass="lable" Text="　　光照:" Font-Names="microsoft yahei"></asp:Label>
                                <asp:Label ID="LabelNowIll0" runat="server" CssClass="lable" Text="-"></asp:Label>
                            </div>
                        </div>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
        <br />
        <asp:UpdatePanel ID="UpdatePanel2" runat="server">
            <ContentTemplate>
                <div class="control">
                    <div class="seetop">操控区域</div>
                    <div class="top">
                        <div class="topl">
                            <div class="toplmode">选择控制模式：</div>
                            <div class="toplauto"><asp:Button ID="butAutoModel" runat="server" Text="开启自动模式" Width="118px" OnClick="butAutoModel_Click" /></div>
                            <div class="toplmanu"><asp:Button ID="butManModel" runat="server" Text="开启手动模式" OnClick="butManModel_Click" Width="118px" /></div>
                        </div>
                        <div class="topr">
                            <div class="status"><asp:Label ID="Label18" runat="server" Text="控制状态："></asp:Label></div>
                            <div class="statusshow"> <asp:Label ID="LabelAreaState" runat="server" Text="-"></asp:Label></div>
                        </div>
                    </div>
                    <div class="left">
                        <div class="controltop">自动模式</div>
                        <div class="leftl">
                            <asp:Label ID="Label19" runat="server" Text="自动控制范围设置："></asp:Label>
                            <br />
                            <br />
                            &nbsp;&nbsp;&nbsp;
                            <asp:Label ID="Label20" runat="server" Text="温  度："></asp:Label>
                            &nbsp;
                            <asp:TextBox ID="textBoxTempMin" runat="server" Width="55px"></asp:TextBox>
                            &nbsp;
                            <asp:Label ID="Label21" runat="server" Text="-"></asp:Label>
                            &nbsp;
                            <asp:TextBox ID="textBoxTempMax" runat="server" Width="55px"></asp:TextBox>
                            &nbsp; ℃<br />
                            <br />
                            &nbsp;&nbsp;&nbsp;
                            <asp:Label ID="Label22" runat="server" Text="光  照："></asp:Label>
                            &nbsp;
                            <asp:TextBox ID="textBoxIllMin" runat="server" Width="55px"></asp:TextBox>
                            &nbsp;
                            <asp:Label ID="Label23" runat="server" Text="-"></asp:Label>
                            &nbsp;
                            <asp:TextBox ID="textboxIllMax" runat="server" Width="55px"></asp:TextBox>
                            &nbsp; KLUX<br />
                            <br />
                            <asp:Label ID="Label25" runat="server" Text="土壤湿度:"></asp:Label>
                            &nbsp;&nbsp;
                            <asp:TextBox ID="textBoxSoilHumMin" runat="server" Width="55px"></asp:TextBox>
                            &nbsp;
                            <asp:Label ID="Label24" runat="server" Text="-"></asp:Label>
                            &nbsp;
                            <asp:TextBox ID="textBoxSoilHumMax" runat="server" Width="55px"></asp:TextBox>
                            &nbsp; %
                        </div>
                    </div>
                    <div class="right">
                        <div class="controltop">手动模式</div>
                        <div class="rightl">
                            <div class="manu">
                                <div class="manutop"><asp:Label ID="Label26" runat="server" Text="手动控制："></asp:Label></div>
                                <div class="manuleft">
                                    <asp:Label ID="Label27" runat="server" Text="风机"></asp:Label>
                                    <br />
                                    <asp:Label ID="Label28" runat="server" Text="天窗"></asp:Label>
                                    <br />
                                    <asp:Label ID="Label29" runat="server" Text="加热灯"></asp:Label>
                                    <br />
                                    <asp:Label ID="Label31" runat="server" Text="补光灯"></asp:Label> 
                                    <br />
                                    <asp:Label ID="Label30" runat="server" Text="喷水灌溉"></asp:Label>
                                </div>
                                <div class="manuopen">
                                    <asp:Button ID="butFanOpen" runat="server" Text="开" OnClick="butFanOpen_Click" />
                                    <br />
                                    <asp:Button ID="butWinOpen" runat="server" Text="开" OnClick="butWinOpen_Click" />
                                    <br />
                                    <asp:Button ID="butHotOpen" runat="server" Text="开" OnClick="butHotOpen_Click" />
                                    <br />
                                    <asp:Button ID="butLightOpen" runat="server" Text="开" OnClick="butLightOpen_Click" />
                                    <br />
                                    <asp:Button ID="butPumpOpen" runat="server" Text="开" OnClick="butPumpOpen_Click" />
                                </div>
                                <div class="manuclose">
                                    <asp:Button ID="butFanClose" runat="server" OnClick="butFanClose_Click" Text="关" />
                                    <br />
                                    <asp:Button ID="butWinClose" runat="server" OnClick="butWinClose_Click" Text="关" />
                                    <br />
                                    <asp:Button ID="butHotClose" runat="server" OnClick="butHotClose_Click" Text="关" />
                                    <br />
                                    <asp:Button ID="butLightClose" runat="server" OnClick="butLightClose_Click" Text="关" />
                                    <br />
                                    <asp:Button ID="butPumpClose" runat="server" OnClick="butPumpClose_Click" Text="关" />
                                </div>
                            </div>
                            <div class="Status">
                                <div class="Statustop">
                                    <asp:Label ID="Label32" runat="server" Text="当前状态"></asp:Label>
                                </div>
                                <div class="StatusShow"> 
                                    <asp:Label ID="lableFanState" runat="server" Text="-"></asp:Label>
                                    <br />
                                    <asp:Label ID="lableWinState" runat="server" Text="-"></asp:Label> 
                                    <br />
                                    <asp:Label ID="lableHotLigState" runat="server" Text="-"></asp:Label>
                                    <br />
                                    <asp:Label ID="lableLightState" runat="server" Text="-"></asp:Label>
                                    <br />
                                    <asp:Label ID="lablePumpState" runat="server" Text="-"></asp:Label>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</asp:Content>

